//
//  UITableView+EmptyView.m
//  letu
//
//  Created by gaoguangxiao on 2022/5/17.
//

#import "UIView+LTEmptyView.h"
#import "LYEmptyView.h"
#import "UIView+Empty.h"

@implementation UIView (LTEmptyView)

- (void)showEmptyView {
    LYEmptyView *emptyView = [LYEmptyView emptyViewWithImage:[UIImage imageNamed:@"config_empty"] titleStr:@"暂无数据" detailStr:nil];
    self.ly_emptyView = emptyView;
    self.ly_emptyView.hidden = YES;
}

- (void)showEmptyTitle:(NSString *)txt imageName:(NSString *)imageName {
    LYEmptyView *emptyView = [LYEmptyView emptyViewWithImage:[UIImage imageNamed:imageName] titleStr:txt detailStr:nil];
    emptyView.titleLabTextColor = [UIColor lightGrayColor];
    self.ly_emptyView = emptyView;
}

- (void)hiddenEmptyView {
    [self.ly_emptyView removeFromSuperview];
    self.ly_emptyView = nil;
   
}
@end
